//
//  RepayMoneyViewController.m
//  OneCreditTreasure
//
//  Created by iOS Grouper on 16/8/29.
//
//

#import "RepayMoneyViewController.h"
#import "RepayMScrollViewTableViewCell.h"
#import "didPepayViewController.h"
@interface RepayMoneyViewController ()<UITableViewDelegate,UITableViewDataSource>
{
    UITableView *myTableView;
}

@end

@implementation RepayMoneyViewController
- (void)viewWillAppear:(BOOL)animated{
    self.tabBarController.tabBar.hidden = YES;
}
- (void)viewWillDisappear:(BOOL)animated{
    self.tabBarController.tabBar.hidden = NO;
}


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = @"车贷还款";
    self.view.backgroundColor = LV;
    myTableView = [UITableView new];
    [self.view addSubview:myTableView];
    myTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    [myTableView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.mas_equalTo(self.view);
        make.width.mas_equalTo(kScreenW);
        make.height.mas_equalTo(kScreenH);
        
    }];
    myTableView.delegate = self;
    myTableView.dataSource = self;
    [myTableView registerClass:[RepayMScrollViewTableViewCell class] forCellReuseIdentifier:@"RepayMScrollViewTableViewCell"];
}


- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 1;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    RepayMScrollViewTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"RepayMScrollViewTableViewCell"];
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    return cell;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 170 * AUTO_HEIGHT;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    didPepayViewController *did = [didPepayViewController new];
    [self.navigationController pushViewController:did animated:YES];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
